1. Field of the Invention
This disclosure generally relates to techniques for making use of unused bits in memory pointers. More specifically, this disclosure relates to techniques for storing data in unused bits of memory pointers, and masking out this stored data when using such memory pointers to access memory addresses.
2. Related Art
Advances in technology have led to improved processor capabilities, increased memory sizes, and increasingly sophisticated applications. For instance, while processors that used 32-bit memory addresses to directly access up to 4 GB of memory were recently common, they are now being displaced by 64-bit processors that include direct support for 64-bit data types and addresses.
However, different processors may manage 64-bit pointers in a range of ways, some of which make the high-order bits of the pointers nearly useless. For instance, some systems ignore the higher 32 bits of 64-bit memory pointers, or require an upper slice of such pointers to be either all ones or all zeros. In such approaches, such unused high-order bytes waste bandwidth and heap storage space. Alternative approaches seek to compress pointers down to 32 bits, thereby potentially reducing waste, but limiting the system to several billion pointers and/or requiring decompression operations.
Hence, what is needed are techniques for using 64-bit pointers without the above-described problems.